﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Meqs.Entity;
using Meqs.Logic.Interface;
using System.Collections.Generic;

public partial class TeacherEval_School_ScoreInput_SelectOther : System.Web.UI.Page
{
    protected int selectCause = 0;
    protected int TypeID
    {
        get
        {
            string g = Request.QueryString["type"];
            int temp = 0;
            if (int.TryParse(g, out temp))
            {
                return temp;
            }
            return -1;
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            CauseID.Text = TypeID.ToString();
            btnBind_Click(null,null);
        }
    }
    protected void btnBind_Click(object sender, EventArgs e)
    {
        SchoolInfo si = SchoolCommon.Sch_SchoolInfo;
        int id = Convert.ToInt32(CauseID.Text);
        Hashtable ht = new Hashtable();
        ht.Add("RoleID", id);
        ht.Add("SchoolYear", si.SchoolYear);
        ht.Add("Term", si.SchoolTerm);
        Repeater1.DataSource = Container<ITeacherEvalDesLogic>.Instance.FindOtherTeacher(ht);
        Repeater1.DataBind();
    }

    protected string GetCauseStr()
    {
        string str = "";
        IList<GlobalCauseInfo> list = Container<IGlobalCauseInfoLogic>.Instance.SelectSchoolCause(CommonScore.GetSchoolMark, 1);
        foreach (GlobalCauseInfo g in list)
        {
            str += "<option value=" + g.RID + "  >" + g.CauseName + "</option>";
        }
        if (list.Count > 0)
        {
            CauseID.Text = list[0].RID.ToString();
            selectCause = list[0].RID;
        }
        return str;
    }
}
